package Prog.Objets;




public class ColonneUniverse implements Comparable {

	String Nom_colonne ="";
	String Locate_colonne ="";
	String Value="";
	String Type="";
	String Format="";
	String SQLType="";
	String Assoc="";
	String Conv="";
	String Name_oracle="";
	String Type_oracle="";
	String Multival="";
	public int id_writer=-1;
	public int getId_writer() {
		return id_writer;
	}



	public void setId_writer(int id_writer) {
		this.id_writer = id_writer;
	}



	public ColonneUniverse() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
	
	public ColonneUniverse(String nom_colonne, String locate_colonne,
			String value, String type, String format, String sQLType, String assoc,String conv,String name_oracle,String type_oracle,String multival) {
		super();
		Nom_colonne = nom_colonne;
		Locate_colonne = locate_colonne;
		Value = value;
		Type = type;
		Format = format;
		SQLType = sQLType;
		Assoc = assoc;
		Conv = conv;
		Name_oracle=name_oracle;
		Type_oracle=type_oracle;
		Multival=multival;
	}



	public String getMultival() {
		return Multival;
	}
	public void setMultival(String multival) {
		Multival = multival;
	}



	public String getName_oracle() {
		return Name_oracle;
	}
	public void setName_oracle(String name_oracle) {
		Name_oracle = name_oracle;
	}
	public String getType_oracle() {
		return Type_oracle;
	}
	public void setType_oracle(String type_oracle) {
		Type_oracle = type_oracle;
	}



	public String getNom_colonne() {
		return Nom_colonne;
	}
	public void setNom_colonne(String nom_colonne) {
		Nom_colonne = nom_colonne;
	}
	public String getLocate_colonne() {
		return Locate_colonne;
	}
	public void setLocate_colonne(String locate_colonne) {
		Locate_colonne = locate_colonne;
	}
	public String getValue() {
		return Value;
	}
	public void setValue(String value) {
		Value = value;
	}



	public String getType() {
		return Type;
	}



	public void setType(String type) {
		Type = type;
	}



	public String getFormat() {
		return Format;
	}



	public void setFormat(String format) {
		Format = format;
	}



	public String getSQLType() {
		return SQLType;
	}



	public void setSQLType(String sQLType) {
		SQLType = sQLType;
	}



	public String getAssoc() {
		return Assoc;
	}



	public void setAssoc(String assoc) {
		Assoc = assoc;
	}



	public String getConv() {
		return Conv;
	}



	public void setConv(String conv) {
		Conv = conv;
	}


	public boolean equals(ColonneUniverse arg0) {
		ColonneUniverse c = arg0;
		if (c.getNom_colonne().equals(this.getNom_colonne()) &&
				c.getLocate_colonne().equals(this.getLocate_colonne())) {
			return true;
		}
		return false;
	}



	@Override
	public int compareTo(Object arg0) {
		
		Integer i1=Integer.parseInt(this.getLocate_colonne());
		Integer i2=Integer.parseInt(((ColonneUniverse) arg0).getLocate_colonne());
		if (i1==i2)	return 0;
		if (i1<i2) return -1;
		if (i1>i2) return 1;
		return 0;
	}
	
	
	
}
